# add.py

from __future__ import division

from ot_simulator.component import component

class add(component.component):
    '''This applies a saved transform.
    
    See :py:class:`.reset`.

    ===============  ==========================
     Input setting   
    ===============  ==========================
    transform        the transform to apply
    ===============  ==========================

    ===============  ==========================
    Output setting
    ===============  ==========================
    <none> 
    ===============  ==========================
    '''
    input_parameters = ('transform',)

    def get_transform(self, params, transform_in):
        transform_out = transform_in.add(self.get_param(params, 'transform'))
        return transform_out


def test():
    import doctest
    import sys
    sys.exit(doctest.testmod()[0])

if __name__ == "__main__":
    test()
